package com.viphome.automic;

/**
 * Created by wangzhanjin on 2018/3/26.
 */
public class JITests {

    private static boolean init = false;

    public static void main(String[] args) {
        new Thread() {
            public void run() {
                while(!init){
                    System.out.println("+++");
                    /**
                     * 如果没有上述sout的话，就直接转换成
                     * while(true){}，这个是JVM处理后的效果
                     */
                }
            }
        }.start();

        new Thread() {
            public void run() {
                init = true;
                System.out.println("set init true");
            }
        }.start();
    }
}
